package com.lanchetech.user.controller;

import com.lanchetech.bean.response.BaseResp;
import com.lanchetech.user.service.IdentityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "会员身份接口", tags = "会员身份接口")
@RequestMapping("/api/identity")
@RestController
public class IdentityController {

    @Autowired
    IdentityService identityService;

    @ApiOperation("赠送合伙人")
    @GetMapping("/createPartner")
    public BaseResp createPartner(@RequestParam("phone") String phone) {
        return identityService.createPartner(phone);
    }

    @ApiOperation("赠送VIP会员")
    @GetMapping("/createMember")
    public BaseResp createMember(@RequestParam("phone") String phone) {
        return identityService.createMember(phone);
    }

}
